import java.util.Iterator;

public class Top10 implements Iterable<Integer> {
	public Iterator<Integer> iterator() {
		return new Top10Iterator();
	}

	public static void main(String[] args) {
		for (int i : new Top10()) {
			for (int j : new Top10()) {
				if (i + j == 15) {
					System.out.println(i + ", " + j);
				}
			}
		}
	}
}

class Top10Iterator implements Iterator<Integer> {
	int counter = 10;

	public Integer next() {
		return new Integer(counter--);
	}

	public boolean hasNext() {
		return counter > 1;
	}

	public void remove() {
		throw new UnsupportedOperationException();
	}
}
